﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UFSSMaster.Master" AutoEventWireup="true" CodeBehind="myfiles.aspx.cs" Inherits="UFSSWebApp.myfiles" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageName" runat="server">
Files / Manage
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Body" runat="server">
    <div class="Box" style="width:520px"> 
        <span class="subheading">My Files</span><hr />
         <table>
            <tbody>
                <tr>
                <td><asp:ListBox ID="lstFiles" runat="server" Height="194px" Width="145px" 
                    AutoPostBack="true" onselectedindexchanged="lstFiles_SelectedIndexChanged"></asp:ListBox></td>
                    <td align="left" valign="top">
                        <table>
                            <tbody>
                                <tr>
                                    <td><b>In subscription: </b></td>
                                    <td></td>
                                    <td><asp:LinkButton ID="lbtnSub" runat="server" onclick="lbtnSub_Click">
                                        <%
                                            try
                                            {
                                                Response.Write(Session["sub"].ToString());
                                            }
                                            catch
                                            {
                                                if(IsPostBack)
                                                    Response.Write("Not in a subscription.");
                                                lbtnSub.Enabled = false;
                                            }
                                             %></asp:LinkButton></td>
                                </tr>
                                <tr><td></td></tr>
                                <tr>
                                    <td><b>Download Count: </b></td>
                                    <td></td>
                                    <td><asp:Label ID="lblDLCount" runat="server" Text=""></asp:Label></td>
                                </tr>
                                <tr><td></td></tr>
                                <tr>
                                    <td><b>File Size: </b></td>
                                    <td></td>
                                    <td><asp:Label ID="lblFileSize" runat="server" Text=""></asp:Label></td>
                                </tr>
                                <tr><td></td></tr>
                                <tr>
                                    <td><b>Date Uploaded: </b></td>
                                    <td></td>
                                    <td><asp:Label ID="lblUploaded" runat="server" Text=""></asp:Label></td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td><asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label></td>
                </tr>
                <tr>
                    <td align="center"><asp:Button ID="btnDelete" runat="server" Text="Delete File" 
                            onclick="btnDelete_Click" Width="123px" /></td>
                </tr>
                <tr>
                    <td align="center">
                        <asp:Button ID="btnDLFile" runat="server" Text="Download File" 
                            Width="123px" onclick="btnDLFile_Click" /></td>
                </tr>
            </tbody>
        </table>
    </div>
</asp:Content>
